package com.meixiang.activity.homes.shopping;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.ViewCompat;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.google.gson.Gson;
import com.lzy.okhttputils.OkHttpUtils;
import com.lzy.okhttputils.model.HttpParams;
import com.lzy.okhttputils.request.BaseRequest;
import com.meixiang.R;
import com.meixiang.adapter.shopping.FilterMenuContentListAdapter;
import com.meixiang.adapter.shopping.GoodsListAdapter;
import com.meixiang.entity.shopping.GoodsMenuItemEntity;
import com.meixiang.entity.shopping.GoodsPriceEntity;
import com.meixiang.entity.shopping.MallMainGoodsEntity;
import com.meixiang.entity.shopping.result.GoodsSearchResult;
import com.meixiang.entity.shopping.result.MallMainResult;
import com.meixiang.global.Config;
import com.meixiang.http.HttpCallBack;
import com.meixiang.http.HttpUtils;
import com.meixiang.main.BaseActivity;
import com.meixiang.recyclerview.OnItemClick;
import com.meixiang.tool.Tool;
import com.meixiang.util.AbJsonUtil;
import com.meixiang.util.AnimUtil;
import com.meixiang.util.GoodsMenuDataUtil;
import com.meixiang.util.TextViewUtil;
import com.meixiang.view.DropDownMenu;
import com.meixiang.view.SearchTitleView;
import com.meixiang.view.swipetoloadlayout.base.OnLoadMoreListener;
import com.meixiang.view.swipetoloadlayout.base.OnRefreshListener;
import com.meixiang.view.swipetoloadlayout.base.SwipeToLoadLayout;
import com.zhy.view.flowlayout.FlowLayout;
import com.zhy.view.flowlayout.TagAdapter;
import com.zhy.view.flowlayout.TagFlowLayout;

import org.json.JSONObject;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import okhttp3.Call;
import okhttp3.Response;

/**
 * 商城首页
 *
 * @author LZRUI
 */
public class ShoppingHomeActivity extends BaseActivity implements SearchTitleView.SearchBarClickListener, OnItemClick, OnRefreshListener, OnLoadMoreListener {

    private static final String TAG = "ShoppingHomeActivity";

    @Bind(R.id.search_title_view)
    SearchTitleView searchTitleView; // 带搜索框的标题栏
    @Bind(R.id.dd_menu)
    DropDownMenu filterMenu; //  筛选栏
    @Bind(R.id.iv_to_top)
    ImageView ivToTop; // 回到顶部
    RecyclerView ryGoodsList; // 商品列表
    SwipeToLoadLayout mRefresh; // 刷新组件
    private View contentView; //  菜单内容显示区域

    private View loadView; // 显示加载的view

    private GoodsListAdapter goodsListAdapter;
    private boolean isLoadMore; // 是否是加载更多

    private String[] headers = new String[]{"货源", "品牌", "筛选"};
    private List<String> headerList = new ArrayList<>();
    private List<MallMainGoodsEntity> goodsList;

    private FilterLayoutViewHolder viewHolder;
    private TagAdapter priceTagAdapter, priceSortTagAdapter, serviceTagAdapter;

    public static int SEARCH_REQUEST_CODE = 0x1;
    public static String SEARCH_KEY = "search_key";

    private int pageNo = 1;
    private String keyWord = null; // 关键字
    private String isNewMarket = null; // Y新上市;N不是新上市
    private String isDiscount = null; // Y有折扣;N没有折扣
    private String goodsTransfreeCharge = null; //1包邮;0不包邮
    private String goodsPriceLow = null; // 查询低价格
    private String goodsPriceHigh = null; // 查询高价格
    private String orderMethod = ""; // 升序ASC/降序DESC
    private String storeId = null; // 店铺id
    private String gcId = null; // 商品类别id
    private boolean filterDataIsNull = true; // 筛选菜单是否为空

    private String brandId = null;//品牌ID

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_shopping_home);
        ButterKnife.bind(this);
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        ButterKnife.unbind(this);
        HttpUtils.tagCancelRequest(TAG);
        GoodsMenuDataUtil.typeMenuList.clear();
        GoodsMenuDataUtil.storeMenuList.clear();
    }

    @Override
    protected void initTitle() {
        // titleView设置点击监听
        searchTitleView.setSearchBarClickListener(this);
    }

    @Override
    protected void initView() {
        // 查询结果显示区域
        contentView = LayoutInflater.from(this).inflate(R.layout.layout_goods_list, null, false);
        mRefresh = (SwipeToLoadLayout) contentView.findViewById(R.id.refresh);
        ryGoodsList = (RecyclerView) contentView.findViewById(R.id.swipe_target);
        // 初始化列表
        initGoodsRecyclerView();
    }

    private void initFilterMenu(MallMainResult mallMainResult) {
        if (mallMainResult == null)
            return;
        List<View> popupViews = new ArrayList<>();

        FilterMenuContentListAdapter typeAdapter = new FilterMenuContentListAdapter();
        FilterMenuContentListAdapter storeAdapter = new FilterMenuContentListAdapter();
        FilterMenuContentListAdapter brandAdapter = new FilterMenuContentListAdapter();

        GoodsMenuDataUtil.setStoreList(mallMainResult.getStoreList());
        GoodsMenuDataUtil.setTypeList(mallMainResult.getGcList());
        GoodsMenuDataUtil.setBrandMenuList(mallMainResult.getBrandList());
        typeAdapter.setData(GoodsMenuDataUtil.getTypeList());
        storeAdapter.setData(GoodsMenuDataUtil.getStoreList());
        brandAdapter.setData(GoodsMenuDataUtil.getBrandList());//这里修改

        RecyclerView typeListView = (RecyclerView) LayoutInflater.from(this).inflate(R.layout.layout_recycler_view, filterMenu, false);
        RecyclerView storeListView = (RecyclerView) LayoutInflater.from(this).inflate(R.layout.layout_recycler_view, filterMenu, false);
        RecyclerView brandListView = (RecyclerView) LayoutInflater.from(this).inflate(R.layout.layout_recycler_view, filterMenu, false);
        View filterLayout = LayoutInflater.from(this).inflate(R.layout.layout_filter_goods, filterMenu, false);
        initFilterLayout(filterLayout, mallMainResult);

        typeListView.setLayoutManager(new LinearLayoutManager(this));
        typeListView.setAdapter(typeAdapter);
        storeListView.setLayoutManager(new LinearLayoutManager(this));
        storeListView.setAdapter(storeAdapter);
        brandListView.setLayoutManager(new LinearLayoutManager(this));
        brandListView.setAdapter(brandAdapter);

        typeAdapter.setOnItemClickListener(new OnItemClick() {
            @Override
            public void onItemClick(View view, int position) {
                GoodsMenuItemEntity gc = GoodsMenuDataUtil.getTypeList().get(position);
                filterMenu.setTabText(position == 0 ? headerList.get(0) : gc.menuName);
                filterMenu.closeMenu();
                // TODO 调用接口
                if (position != 0) {
                    gcId = String.valueOf(gc.menuId);
                } else {
                    gcId = null;
                }
                refreshGoodsData(1, false);
            }
        });

        storeAdapter.setOnItemClickListener(new OnItemClick() {
            @Override
            public void onItemClick(View view, int position) {
                GoodsMenuItemEntity store = GoodsMenuDataUtil.getStoreList().get(position);
                filterMenu.setTabText(position == 0 ? headerList.get(1) : store.menuName);
                filterMenu.closeMenu();
                // TODO 调用接口
                if (position != 0) {
                    storeId = String.valueOf(store.menuId);
                } else {
                    storeId = null;
                }
                refreshGoodsData(1, false);
            }
        });

        brandAdapter.setOnItemClickListener(new OnItemClick() {
            @Override
            public void onItemClick(View view, int position) {
                filterMenu.setTabText(position == 0 ? headerList.get(2) : GoodsMenuDataUtil.getBrandList().get(position).menuName);
                filterMenu.closeMenu();
                brandId = GoodsMenuDataUtil.getBrandList().get(position).menuId;
                refreshGoodsData(1, false);
            }
        });
        popupViews.add(typeListView);
        popupViews.add(storeListView);
        popupViews.add(brandListView);
        popupViews.add(filterLayout);

        headerList.add(mallMainResult.getCategoryName());
        headerList.addAll(Arrays.asList(headers));
        filterMenu.setDropDownMenu(headerList, popupViews, contentView);
    }

    /**
     * 初始化筛选栏选项
     *
     * @param view
     */
    @SuppressWarnings("unchecked")
    private void initFilterLayout(final View view, final MallMainResult mallMainResult) {
        viewHolder = new FilterLayoutViewHolder(view);
        viewHolder.tvGoodsNum.setText(String.format(getString(R.string.have_goods_num), mallMainResult.getTotalCount()));
        final String num = viewHolder.tvGoodsNum.getText().toString();
        TextViewUtil.setDiffColorText(viewHolder.tvGoodsNum, num, 1, num.length() - 3, R.color.goods_price_red);
        viewHolder.tvReset.setOnClickListener(this);
        viewHolder.tvFinish.setOnClickListener(this);

        viewHolder.serviceTagFlow.setAdapter(serviceTagAdapter = new TagAdapter(mallMainResult.getServiceList()) {
            @Override
            public View getView(FlowLayout parent, int position, Object o) {
                TextView tag = (TextView) LayoutInflater.from(ShoppingHomeActivity.this).inflate(R.layout.view_goods_service_tag, viewHolder.serviceTagFlow, false);
                tag.setText((String) o);
                return tag;
            }
        });
        // 多选
        viewHolder.serviceTagFlow.setOnSelectListener(new TagFlowLayout.OnSelectListener() {
            @Override
            public void onSelected(Set<Integer> selectPosSet) {
                goodsTransfreeCharge = null;
                isDiscount = null;
                isNewMarket = null;
                // TODO
                Iterator it = selectPosSet.iterator();
                while (it.hasNext()) {
                    int index = (int) it.next();
                    String str = mallMainResult.getServiceList().get(index);
                    if (str.contains("包邮")) {
                        goodsTransfreeCharge = "1";
                    } else if (str.contains("折扣")) {
                        isDiscount = "Y";
                    } else if (str.contains("上市")) {
                        isNewMarket = "Y";
                    }
                }

            }
        });

        viewHolder.priceTagFlow.setMaxSelectCount(1);
        viewHolder.priceTagFlow.setAdapter(priceTagAdapter = new TagAdapter(mallMainResult.getPriceList()) {
            @Override
            public View getView(FlowLayout parent, int position, Object o) {
                View tag = LayoutInflater.from(ShoppingHomeActivity.this).inflate(R.layout.view_goods_price_tag, viewHolder.priceTagFlow, false);
                tag.setDuplicateParentStateEnabled(true);
                TextView tvRange = (TextView) tag.findViewById(R.id.tv_price_range);
                TextView tvSelect = (TextView) tag.findViewById(R.id.tv_select_rang);
                GoodsPriceEntity bean = (GoodsPriceEntity) o;
                tvRange.setText(Tool.formatPriceRange(bean.getLowPrice(), bean.getHighPrice()));
                tvSelect.setText(String.format(getString(R.string.price_select_num), bean.getPercent()));
                return tag;
            }
        });

        // 单选
        viewHolder.priceTagFlow.setOnSelectListener(new TagFlowLayout.OnSelectListener() {
            @Override
            public void onSelected(Set<Integer> selectPosSet) {
                if (selectPosSet != null && selectPosSet.size() > 0) {
                    int index = selectPosSet.iterator().next();
                    GoodsPriceEntity priceEntity = mallMainResult.getPriceList().get(index);
                    viewHolder.editPriceLow.setText(priceEntity.getLowPrice().isEmpty() ? "--" : priceEntity.getLowPrice());
                    viewHolder.editPriceHigh.setText(priceEntity.getHighPrice().isEmpty() ? "--" : priceEntity.getHighPrice());
                }
            }
        });

        viewHolder.priceSortTagFlow.setMaxSelectCount(1);
        viewHolder.priceSortTagFlow.setAdapter(priceSortTagAdapter = new TagAdapter(GoodsMenuDataUtil.getPriceSortList()) {
            @Override
            public View getView(FlowLayout parent, int position, Object o) {
                TextView tag = (TextView) LayoutInflater.from(ShoppingHomeActivity.this).inflate(R.layout.view_goods_service_tag, viewHolder.priceSortTagFlow, false);
                tag.setText((String) o);
                return tag;
            }
        });
        viewHolder.priceSortTagFlow.setOnSelectListener(new TagFlowLayout.OnSelectListener() {
            @Override
            public void onSelected(Set<Integer> selectPosSet) {
                //size==0为不选中，则赋值为不排序
                if (selectPosSet.size() == 0) {
                    orderMethod = null;
                } else {
                    Iterator it = selectPosSet.iterator();
                    while (it.hasNext()) {
                        int index = (int) it.next();
                        //String str = GoodsMenuDataUtil.getPriceSortList().get(index);
                        if (index == 0) {
                            orderMethod = null;
                        } else if (index == 1) {
                            orderMethod = "ASC";
                        } else {
                            orderMethod = "DESC";
                        }
                    }
                }


            }
        });
    }

    /**
     * 初始化商品列表
     */
    private void initGoodsRecyclerView() {
        goodsListAdapter = new GoodsListAdapter(this);
        goodsListAdapter.setOnItemClickListener(this);
        ryGoodsList.setLayoutManager(new GridLayoutManager(this, 2));
        ryGoodsList.setAdapter(goodsListAdapter);
        ivToTop.setVisibility(View.GONE);

        ryGoodsList.addOnScrollListener(new RecyclerView.OnScrollListener() {
            @Override
            public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
                super.onScrolled(recyclerView, dx, dy);
                GridLayoutManager layoutManager = (GridLayoutManager) recyclerView.getLayoutManager();
                int firstVisibleItem = layoutManager.findFirstCompletelyVisibleItemPosition();

                if (firstVisibleItem > 0) {
                    AnimUtil.viewAlphaIn(ivToTop);
                } else {
                    AnimUtil.viewAlphaOut(ivToTop);
                }
            }
        });

        mRefresh.setOnRefreshListener(this);
        mRefresh.setOnLoadMoreListener(this);

        //RecyclerView滑到底部自动加载更多
        ryGoodsList.addOnScrollListener(new RecyclerView.OnScrollListener() {
            @Override
            public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
                if (newState == RecyclerView.SCROLL_STATE_IDLE) {
                    if (!ViewCompat.canScrollVertically(recyclerView, 1)) {
                        mRefresh.setLoadingMore(true);
                    }
                }
            }
        });
    }

    @Override
    protected void setData() {
        getMenuData();
        refreshGoodsData(1, false);
    }

    @Override
    @OnClick(R.id.iv_to_top)
    public void onClick(View v) {
        if (Tool.isFastDoubleClick()) return;
        switch (v.getId()) {
            // 回到顶部
            case R.id.iv_to_top:
                ryGoodsList.smoothScrollToPosition(0);
                break;
            // 筛选重置
            case R.id.tv_reset:
                reSetSearchData();
                break;
            // 筛选完成
            case R.id.tv_finish:
                filterMenu.closeMenu();
                goodsPriceLow = viewHolder.editPriceLow.getText().toString().trim();
                goodsPriceHigh = viewHolder.editPriceHigh.getText().toString().trim();
                if (goodsPriceHigh.equals("--")){
                    goodsPriceHigh=null;
                }
                refreshGoodsData(1, false);
                break;
        }

    }

    /**
     * 重置筛选里面的条件
     */
    private void reSetSearchData() {
        if (priceTagAdapter != null) {
            priceTagAdapter.setSelectedList();
            priceTagAdapter.notifyDataChanged();
        }
        if (priceSortTagAdapter != null) {
            priceSortTagAdapter.setSelectedList();
            priceSortTagAdapter.notifyDataChanged();
        }
        if (serviceTagAdapter != null) {
            serviceTagAdapter.setSelectedList();
            serviceTagAdapter.notifyDataChanged();
        }
        if (viewHolder != null) {
            if (viewHolder.editPriceHigh != null) {
                viewHolder.editPriceHigh.setText("");
            }
            if (viewHolder.editPriceLow != null) {
                viewHolder.editPriceLow.setText("");
            }
        }
    /**
     * 清空数据
     * */
        keyWord = null; // 关键字
        isNewMarket = null; // Y新上市;N不是新上市
        isDiscount = null; // Y有折扣;N没有折扣
        goodsTransfreeCharge = null; //1包邮;0不包邮
        goodsPriceLow = null; // 查询低价格
        goodsPriceHigh = null; // 查询高价格
        orderMethod = ""; // 升序ASC/降序DESC
        storeId = null; // 店铺id
        gcId = null; // 商品类别id


    }

    /**
     * 重置菜单的选项
     */
    private void reSetFilterMenu() {
        reSetSearchData();
        searchTitleView.clearTag();
        if (headerList == null) return;
        if (headerList.size() > 0) {
            filterMenu.setTabText(0, headerList.get(0));
        }
        if (headerList.size() > 1) {
            filterMenu.setTabText(2, headerList.get(1));
        }
        if (headerList.size() > 2) {
            filterMenu.setTabText(4, headerList.get(2));
        }
        keyWord = null; // 关键字
        isNewMarket = null; // Y新上市;N不是新上市
        isDiscount = null; // Y有折扣;N没有折扣
        goodsTransfreeCharge = null; //1包邮;0不包邮
        goodsPriceLow = null; // 查询低价格
        goodsPriceHigh = null; // 查询高价格
        orderMethod = ""; // 升序ASC/降序DESC
        storeId = null; // 店铺id
        gcId = null; // 商品类别id
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (data != null && resultCode == RESULT_OK) {
            // TODO 搜索界面回调
            keyWord = data.getStringExtra(SEARCH_KEY);
            searchTitleView.setKeyWord(keyWord);
            refreshGoodsData(1, false);
        }
    }

    @Override
    public void onReturnClick() {
        finish();
    }

    @Override
    public void onSearchClick() {
        startActivityForResult(new Intent(this, SearchGoodsActivity.class), SEARCH_REQUEST_CODE);
    }

    @Override
    public void onShoppingCarClick() {
        // TODO 进入购物车界面
        startActivity(new Intent(this, ShoppingCartActivity.class));
    }

    @Override
    public void onDeleteKeyTag() {
        // TODO 去除关键字搜索
        keyWord = null;
        refreshGoodsData(1, false);
    }

    @Override
    public void onLoadMore() {
        // TODO 加载更多
        refreshGoodsData(++pageNo, true);
    }

    @Override
    public void onRefresh() {
        // TODO 刷新
        refreshGoodsData(1, false);
    }

    @Override
    public void onItemClick(View view, int position) {
        // TODO 商品item点击事件
        Intent intent = new Intent(this, GoodsDetailActivity.class);
        intent.putExtra(GoodsDetailActivity.GOODS_ID, goodsList.get(position).getGoodsId());
        startActivity(intent);
    }

    @Override
    public void onBackPressed() {
        if (filterMenu.isShowing()) {
            filterMenu.closeMenu();
            return;
        }
        super.onBackPressed();
    }

    /**
     * 刷新商品数据
     */
    private void refreshGoodsData(int page, boolean loadMore) {
        pageNo = page;
        isLoadMore = loadMore;
        getGoodsData(false);
    }

    /**
     * 获取商品列表
     *
     * @param isBtnRefresh 是否是无数据时，点击按钮的刷新
     */
    private void getGoodsData(boolean isBtnRefresh) {
        HttpParams params = new HttpParams();
        params.put("pageSize", "20");
        params.put("pageNo", String.valueOf(pageNo));
        Log.e("lw","输出当前的isBtnRefresh="+isBtnRefresh);
        if (!isBtnRefresh) {

            params.put("brandId", brandId);
            params.put("keyword", keyWord);
            params.put("isNewMarket", isNewMarket);
            params.put("isDiscount", isDiscount);
            params.put("goodsTransfreeCharge", goodsTransfreeCharge);
            params.put("goodsPriceLow", goodsPriceLow);
            params.put("goodsPriceHigh", goodsPriceHigh);
            params.put("storeId", storeId);
            params.put("gcId", gcId);
            params.put("orderField", "goodsStorePrice");
            params.put("orderMethod", orderMethod);
        }

        Log.i("lzrtest", params.toString());
        HttpUtils.post(Config.GOODS_SEARCH, TAG, params, new HttpCallBack(ShoppingHomeActivity.this) {

            @Override
            public void onBefore(BaseRequest request) {
                if (filterDataIsNull) {
                    loadView = filterMenu;
                } else {
                    loadView = contentView;
                }

                if (!Tool.isNetworkAvailable(activity)) {
                    OkHttpUtils.getInstance().cancelTag(ShoppingHomeActivity.this);
                    if (status == null || loadView == null) return;
                    status.showNoNewWork(loadView, null);
                } else {
//                    if (!isLoadMore) {
//                        if (status == null || loadView == null) return;
//                            status.showLoading(loadView);
//                    }
                }
            }

            @Override
            public void onSucceed(JSONObject result, String code, String message) {
                GoodsSearchResult goodsSearchResult = AbJsonUtil.fromJson(result.toString(), GoodsSearchResult.class);
                if (goodsSearchResult != null && goodsSearchResult.getGoodsList() != null) {
                    if (isLoadMore) {
                        // 加载更多
                        goodsList.addAll(goodsSearchResult.getGoodsList());
                    } else {
                        goodsList = goodsSearchResult.getGoodsList();
                    }
                    if (mRefresh == null) return;
                    if (goodsSearchResult.getGoodsList().size() < 20) {
                        mRefresh.setLoadingMore(false);
                        mRefresh.setLoadMoreEnabled(false);
                    } else {
                        mRefresh.setLoadMoreEnabled(true);
                    }
                }
            }

            @Override
            public void onError(String code, String message) {

            }

            @Override
            public void onAfter(boolean isFromCache, JSONObject jsonObject, Call call, Response response, Exception e) {
                if (mRefresh != null) {
                    if (mRefresh.isRefreshing()) {
                        mRefresh.setRefreshing(false);
                    } else if (mRefresh.isLoadingMore()) {
                        mRefresh.setLoadingMore(false);
                    }
                }

                if (status == null || loadView == null || goodsListAdapter == null) return;
                if (goodsList == null || goodsList.size() == 0) {
                    status.showNoData(loadView, "没有找到可以购买的商品，请刷新试试", "立即刷新", new View.OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            if (filterDataIsNull) {
                                getMenuData();
                            }
                            getGoodsData(true);
                            reSetFilterMenu();
                        }
                    });
                } else {
                    status.removeView();
                    goodsListAdapter.refreshData(goodsList);
                }
            }

        });
    }

    /**
     * 获取菜单数据
     */
    private void getMenuData() {
        HttpUtils.post(Config.MALL_MAIN, TAG, null, new HttpCallBack(ShoppingHomeActivity.this) {
            @Override
            public void onSucceed(JSONObject result, String code, String message) {
                MallMainResult mallMainResult = new Gson().fromJson(result.toString(), MallMainResult.class);
                if (mallMainResult != null) {
                    initFilterMenu(mallMainResult);
                    filterDataIsNull = false;
                }
            }

            @Override
            public void onError(String code, String message) {
            }
        });
    }

    /**
     * 筛选内容ViewHolder
     */
    static class FilterLayoutViewHolder {
        @Bind(R.id.edit_price_low)
        EditText editPriceLow;
        @Bind(R.id.edit_price_high)
        EditText editPriceHigh;
        @Bind(R.id.price_tag_flow)
        TagFlowLayout priceTagFlow;
        @Bind(R.id.price_sort_tag_flow)
        TagFlowLayout priceSortTagFlow;
        @Bind(R.id.service_tag_flow)
        TagFlowLayout serviceTagFlow;
        @Bind(R.id.tv_goods_num)
        TextView tvGoodsNum;
        @Bind(R.id.tv_reset)
        TextView tvReset;
        @Bind(R.id.tv_finish)
        TextView tvFinish;

        FilterLayoutViewHolder(View view) {
            ButterKnife.bind(this, view);
        }
    }
}
